﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.Services;

public partial class Process_AjaxPage : System.Web.UI.Page
{
    
    [WebMethod]
    public static string Ajax_Register(string Fullname, string Nickname, int Sex, string Email, string Birthday, string Url, string Password)
    {
        string aaa = "";
        
        Admin.DB.ExecCommand("spUser_Insert", Fullname, Nickname, Sex, Email, Birthday, Url, Password);
        return aaa;
    }

    [WebMethod]
    public static Boolean Ajax_CheckEmail(string Email)
    {
        Boolean sJS = true;
        try
        {
            DataTable  dt = new DataTable();
            Admin.DB.GetDataTable(ref dt, "spUser_CheckEmail",Email);
            if (int.Parse(dt.Rows[0]["slEmail"].ToString()) > 0)
            {
                sJS = false;
            }
            //sJS += "var ErrCode=" + t.Rows[0][0].ToString() + ";";
            //sJS += "var ErrMsg='" + t.Rows[0][1].ToString() + "';";
        }
        catch (Exception ex)
        {
            //Process_Catch(ex);
        }
        return sJS;
    }
}